package com.gmrz.uap.resource;

import com.gmrz.uap.cfg.SystemConst;
import com.gmrz.uap.common.ControllerSupport;
import com.gmrz.uap.common.DbConst;
import com.gmrz.uap.common.UAPSSOHelper;
import com.gmrz.uap.easyui.JsonTreeData;
import com.gmrz.uap.easyui.TreeNodeUtil;
import com.gmrz.uap.jfinal.interceptor.SuperAdminAuthInterceptor;
import com.gmrz.uap.model.Resource;
import com.gmrz.uap.model.ResourceRole;
import com.gmrz.uap.model.User;
import com.gmrz.uap.operlog.OperLogService;
import com.gmrz.uap.util.Identities;
import com.jfinal.aop.Before;
import com.jfinal.kit.PathKit;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.render.JsonRender;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;

import java.io.File;
import java.math.BigDecimal;
import java.util.*;

public class ResourceController extends ControllerSupport {

    private static final Logger LOG = Logger.getLogger(ResourceController.class);

    /**
     * 资源管理主页面
     */
    @Before({ResourceInterceptor.class, SuperAdminAuthInterceptor.class})
    public void index() {
    }

    /**
     * 根据前台发过来的参数进行查询，可以进行分页，排序
     */
    public void list() {

        int page = getParaToInt("page", 1);
        int rows = getParaToInt("rows", 10);
        String sort = getPara("sort", "resource_id");
        String order = getPara("order", "desc");

        Resource resource = getModel(Resource.class);

        Page<Resource> descPage = ResourceService.me.findResourceListForPaginate(resource, page, rows, sort, order);

        result.put("total", descPage.getTotalRow());
        result.put("rows", descPage.getList());

        render(responseJsonRender(result));
    }


    /**
     * 获取树相关数据
     */
    public void getTreeList() {

        String roleId = getPara(0);
        String isEnable = getPara(1);

        List<Resource> resultList = Resource.dao.findResourceAndCheckStateByRoleId(roleId, isEnable);
        List<JsonTreeData> treeDataList = new ArrayList<JsonTreeData>();

        for (Resource resource : resultList) {
            JsonTreeData treeData = new JsonTreeData();
            treeData.setId(resource.getResourceId());
            treeData.setPid(resource.getPid());
            treeData.setText(getRes().get(resource.getResourceName()));

            if (StrKit.isBlank(resource.getStr(DbConst.TABLE_RESOURCE_ROLE_COLUMN_CHECK_STATE))) {
                treeData.setCheckState("unchecked");
                treeData.setChecked(Boolean.FALSE);
            } else {
                treeData.setCheckState(resource.getStr(DbConst.TABLE_RESOURCE_ROLE_COLUMN_CHECK_STATE));
                if (StringUtils.equals(resource.getStr(DbConst.TABLE_RESOURCE_ROLE_COLUMN_CHECK_STATE), "checked")) {
                    treeData.setChecked(Boolean.TRUE);
                } else {
                    treeData.setChecked(Boolean.FALSE);
                }
            }

            treeData.setAttributes(resource);
            treeDataList.add(treeData);
        }
        //最后得到结果集,经过转换后就可得所需的json格式
        List<JsonTreeData> newTreeDataList = TreeNodeUtil.getfatherNode(treeDataList);
        render(responseJsonRender(newTreeDataList));
    }

    /**
     * 根据角色ID获取树列表
     */
    public void getTreeListByRoleId() {
        String role_id = getPara();
        List<Resource> resourceList = ResourceService.me.getTreeListByRoleId(role_id);

        List<Resource> tempList = new ArrayList<Resource>();

        for (Resource resource : resourceList) {
            resource.put("name", getRes().get(resource.getResourceName()));
            resource.put("checked", StrKit.notBlank(resource.getStr("rr_id")));
            resource.put("open", true);
            tempList.add(resource);
        }

        render(responseJsonRender(tempList));
    }


    /**
     * 根据角色ID获取树列表
     */
    public void getTreeListByUserIdAndType() {
        //User user = getSessionAttr("UserInfo");

        User user = UAPSSOHelper.getUserByUapSessionId(getRequest());

        int type = getParaToInt();
        render(responseJsonRender(ResourceService.me.getTreeListByUserId(user.getStr("user_id"), type)));
    }

    /**
     * 增加页面跳转
     */

    public void add() {
        render("form" + SystemConst.VIEW_EXTENDSION);
    }

    /**
     * 保存数据信息
     */
    public void save() {

        Resource resource = getModel(Resource.class);

        if (null == resource) {
            message = "参数不能为空，请重新选择！";
        } else {

            if (StrKit.isBlank(resource.getPid())) {
                resource.setPid("0");
            }
            resource.setResourceId(Identities.uuid2());
            flag = ResourceService.me.save(resource);

            if (flag) {

                if (StrKit.equals(resource.getIsEnable(), "1")) {//将权限添加到超级管理员
                    String resourceIdList = ResourceService.me.getCascadeResourceIDList(resource.getResourceId(), false);
                    ResourceService.me.batchSave(SystemConst.SUPER_ROLE_ID, "checked", resourceIdList.split(SystemConst._DEFAULT_SEPARATOR_COMMA));
                }

                message = "资源添加成功！";
            } else {
                message = "资源添加失败，请重试！";
            }
        }

        result.put("flag", flag);
        result.put("message", message);
        render(responseJsonRender(result));
    }

    /**
     * 获取所有资源信息
     */
    public void findAll() {
        List<Resource> resources = ResourceService.me.findAll();
        List<ResourceTreeGrid> resourceTreeGrids = new ArrayList<ResourceTreeGrid>();

        for (int i = 0; i < resources.size(); i++) {
            Resource resource = resources.get(i);
            ResourceTreeGrid resourceTreeGrid = new ResourceTreeGrid();
            resourceTreeGrid.setResourceId(resource.getResourceId());
            resourceTreeGrid.setResourceName(getRes().get(resource.getResourceName()));
            if (!StrKit.equals(resource.getPid(), "0")) {//当父节点为0时不添加数据
                resourceTreeGrid.set_parentId(resource.getPid());
            }
            resourceTreeGrid.setUrl(resource.getUrl());
            resourceTreeGrid.setResourceType(resource.getResourceType());
            resourceTreeGrid.setIconCls(resource.getIcon());
            resourceTreeGrid.setIsEnable(resource.getIsEnable());
            resourceTreeGrid.setDes(resource.getDes());
            resourceTreeGrid.setOrderNumber(resource.getOrderNumber());
            resourceTreeGrid.setCreatets(resource.getCreatets());
            resourceTreeGrid.setUpdatets(resource.getUpdatets());

            resourceTreeGrids.add(resourceTreeGrid);
        }

        result.put("total", resourceTreeGrids.size());
        result.put("rows", resourceTreeGrids);

        render(responseJsonRender(result));
    }

    /**
     * 编辑页面跳转
     */
    public void edit() {
        setAttr("resource", ResourceService.me.findOne(getPara()));
        render("form" + SystemConst.VIEW_EXTENDSION);
    }

    /**
     * 修改数据信息
     */
    public void update() {
        Resource resource = getModel(Resource.class);

        if (null == resource) {
            message = "参数不能为空，请重新选择！";
        } else {

            if (StrKit.isBlank(resource.getPid())) {
                resource.setPid("0");
            }

            flag = ResourceService.me.update(resource);


            if (flag) {
                if (StrKit.equals(resource.getIsEnable(), "1")) {//将权限添加到超级管理员
                    String resourceIdList = ResourceService.me.getCascadeResourceIDList(resource.getResourceId(), false);
                    ResourceService.me.batchSave(SystemConst.SUPER_ROLE_ID, "checked", resourceIdList.split(SystemConst._DEFAULT_SEPARATOR_COMMA));
                } else {
                    String resourceIdList = ResourceService.me.getCascadeResourceIDList(resource.getResourceId(), true);
                    ResourceRole.dao.deletCascadeByResourceId(resourceIdList);//删除资源角色表中的资源信息
                }

                message = "资源修改成功！";
            } else {
                message = "资源修改失败，请重试！";
            }
        }

        result.put("flag", flag);
        result.put("message", message);
        render(responseJsonRender(result));
    }

    /**
     * 根据ID删除数据信息，可以同时删除多个，数据使用逗号(,)隔开
     */
    public void remove() {

        String resourceId = getPara("resourceId");

        if (StrKit.isBlank(resourceId)) {
            message = "参数不能为空，请重新选择!";
        } else {

            flag = ResourceService.me.remove(resourceId);

            if (flag) {
                message = "资源信息删除成功！";
            } else {
                message = "资源信息删除失败，请稍后重试！";
            }
        }

        result.put("flag", flag);
        result.put("message", message);
        render(responseJsonRender(result));
    }

    /**
     * 判断资源是否存在
     */
    public void exist() {
        flag = ResourceService.me.exist(getPara());
        render(responseJsonRender(flag));
    }

    /**
     * 级联删除
     */
    public void cascadeDelete() {
        String ids = getPara();

        if (StrKit.isBlank(ids)) {
            message = "参数不能为空，请重新选择!";
        } else {

            flag = ResourceService.me.cascadeDelete(ids);

            if (flag) {
                message = "资源信息删除成功！";
            } else {
                message = "资源信息删除失败，请稍后重试！";
            }
        }

        result.put("flag", flag);
        result.put("message", message);
        render(responseJsonRender(result));
    }


    public void iconSelect() {
        /*String imgPath = PathKit.getWebRootPath() + "/static/img/slik";
        File[] fileList = new File(imgPath).listFiles();

        Collections.sort(Arrays.asList(fileList), new Comparator<File>() {
            @Override
            public int compare(File o1, File o2) {
                if (o1.isDirectory() && o2.isFile())
                    return -1;
                if (o1.isFile() && o2.isDirectory())
                    return 1;
                return o2.getName().compareTo(o1.getName());
            }
        });

        StringBuilder sb = new StringBuilder();
        sb.append("{");
        for (File file : fileList) {
            sb.append("\"");
            sb.append(file.getName().replace(".png", ""));
            sb.append("\",");
        }
        sb.append("}");
        System.out.println(sb);*/

        String[] imgList = {"zoom_out", "zoom_in", "zoom", "xhtml_valid", "xhtml_go", "xhtml_delete", "xhtml_add", "xhtml", "wrench_orange", "wrench", "world_link", "world_go", "world_edit", "world_delete", "world_add", "world", "webcam_error", "webcam_delete", "webcam_add", "webcam", "weather_sun", "weather_snow", "weather_rain", "weather_lightning", "weather_cloudy", "weather_clouds", "wand", "vector_delete", "vector_add", "vector", "vcard_edit", "vcard_delete", "vcard_add", "vcard", "user_suit", "user_red", "user_orange", "user_green", "user_gray", "user_go", "user_female", "user_edit", "user_delete", "user_comment", "user_add", "user", "tux", "transmit_go", "transmit_error", "transmit_edit", "transmit_delete", "transmit_blue", "transmit_add", "transmit", "timeline_marker", "time_go", "time_delete", "time_add", "time", "tick", "thumb_up", "thumb_down", "textfield_rename", "textfield_key", "textfield_delete", "textfield_add", "textfield", "text_uppercase", "text_underline", "text_superscript", "text_subscript", "text_strikethrough", "text_smallcaps", "text_signature", "text_replace", "text_padding_top", "text_padding_right", "text_padding_left", "text_padding_bottom", "text_lowercase", "text_list_numbers", "text_list_bullets", "text_linespacing", "text_letterspacing", "text_letter_omega", "text_kerning", "text_italic", "text_indent_remove", "text_indent", "text_horizontalrule", "text_heading_6", "text_heading_5", "text_heading_4", "text_heading_3", "text_heading_2", "text_heading_1", "text_dropcaps", "text_columns", "text_bold", "text_allcaps", "text_align_right", "text_align_left", "text_align_justify", "text_align_center", "television_delete", "television_add", "television", "telephone_link", "telephone_key", "telephone_go", "telephone_error", "telephone_edit", "telephone_delete", "telephone_add", "telephone", "tag_yellow", "tag_red", "tag_purple", "tag_pink", "tag_orange", "tag_green", "tag_blue_edit", "tag_blue_delete", "tag_blue_add", "tag_blue", "tag", "table_sort", "table_save", "table_row_insert", "table_row_delete", "table_relationship", "table_refresh", "table_multiple", "table_link", "table_lightning", "table_key", "table_go", "table_gear", "table_error", "table_edit", "table_delete", "table_add", "table", "tab_go", "tab_edit", "tab_delete", "tab_add", "tab", "sum", "style_go", "style_edit", "style_delete", "style_add", "style", "stop", "status_online", "status_offline", "status_busy", "status_away", "star", "sport_tennis", "sport_soccer", "sport_shuttlecock", "sport_raquet", "sport_golf", "sport_football", "sport_basketball", "sport_8ball", "spellcheck", "sound_none", "sound_mute", "sound_low", "sound_delete", "sound_add", "sound", "sitemap_color", "sitemap", "shield_go", "shield_delete", "shield_add", "shield", "shape_ungroup", "shape_square_link", "shape_square_key", "shape_square_go", "shape_square_error", "shape_square_edit", "shape_square_delete", "shape_square_add", "shape_square", "shape_rotate_clockwise", "shape_rotate_anticlockwise", "shape_move_front", "shape_move_forwards", "shape_move_backwards", "shape_move_back", "shape_handles", "shape_group", "shape_flip_vertical", "shape_flip_horizontal", "shape_align_top", "shape_align_right", "shape_align_middle", "shape_align_left", "shape_align_center", "shape_align_bottom", "shading", "server_uncompressed", "server_link", "server_lightning", "server_key", "server_go", "server_error", "server_edit", "server_delete", "server_database", "server_connect", "server_compressed", "server_chart", "server_add", "server", "script_save", "script_palette", "script_link", "script_lightning", "script_key", "script_go", "script_gear", "script_error", "script_edit", "script_delete", "script_code_red", "script_code", "script_add", "script", "ruby_put", "ruby_link", "ruby_key", "ruby_go", "ruby_get", "ruby_gear", "ruby_delete", "ruby_add", "ruby", "rss_valid", "rss_go", "rss_delete", "rss_add", "rss", "rosette", "resultset_previous", "resultset_next", "resultset_last", "resultset_first", "report_word", "report_user", "report_picture", "report_magnify", "report_link", "report_key", "report_go", "report_edit", "report_disk", "report_delete", "report_add", "report", "rainbow", "printer_error", "printer_empty", "printer_delete", "printer_add", "printer", "plugin_link", "plugin_go", "plugin_error", "plugin_edit", "plugin_disabled", "plugin_delete", "plugin_add", "plugin", "pill_go", "pill_delete", "pill_add", "pill", "pilcrow", "pictures", "picture_save", "picture_link", "picture_key", "picture_go", "picture_error", "picture_empty", "picture_edit", "picture_delete", "picture_add", "picture", "photos", "photo_link", "photo_delete", "photo_add", "photo", "phone_sound", "phone_delete", "phone_add", "phone", "pencil_go", "pencil_delete", "pencil_add", "pencil", "paste_word", "paste_plain", "palette", "paintcan", "paintbrush", "page_world", "page_word", "page_white_zip", "page_white_wrench", "page_white_world", "page_white_word", "page_white_width", "page_white_visualstudio", "page_white_vector", "page_white_tux", "page_white_text_width", "page_white_text", "page_white_swoosh", "page_white_star", "page_white_stack", "page_white_ruby", "page_white_put", "page_white_powerpoint", "page_white_picture", "page_white_php", "page_white_paste", "page_white_paintbrush", "page_white_paint", "page_white_office", "page_white_medal", "page_white_magnify", "page_white_link", "page_white_lightning", "page_white_key", "page_white_horizontal", "page_white_h", "page_white_go", "page_white_get", "page_white_gear", "page_white_freehand", "page_white_flash", "page_white_find", "page_white_excel", "page_white_error", "page_white_edit", "page_white_dvd", "page_white_delete", "page_white_database", "page_white_cup", "page_white_csharp", "page_white_cplusplus", "page_white_copy", "page_white_compressed", "page_white_coldfusion", "page_white_code_red", "page_white_code", "page_white_cd", "page_white_camera", "page_white_c", "page_white_add", "page_white_actionscript", "page_white_acrobat", "page_white", "page_save", "page_refresh", "page_red", "page_paste", "page_paintbrush", "page_link", "page_lightning", "page_key", "page_green", "page_go", "page_gear", "page_find", "page_excel", "page_error", "page_edit", "page_delete", "page_copy", "page_code", "page_attach", "page_add", "page", "package_link", "package_green", "package_go", "package_delete", "package_add", "package", "overlays", "note_go", "note_error", "note_edit", "note_delete", "note_add", "note", "newspaper_link", "newspaper_go", "newspaper_delete", "newspaper_add", "newspaper", "new", "music", "mouse_error", "mouse_delete", "mouse_add", "mouse", "monitor_link", "monitor_lightning", "monitor_go", "monitor_error", "monitor_edit", "monitor_delete", "monitor", "money_yen", "money_pound", "money_euro", "money_dollar", "money_delete", "money_add", "money", "medal_silver_delete", "medal_silver_add", "medal_silver_3", "medal_silver_2", "medal_silver_1", "medal_gold_delete", "medal_gold_add", "medal_gold_3", "medal_gold_2", "medal_gold_1", "medal_bronze_delete", "medal_bronze_add", "medal_bronze_3", "medal_bronze_2", "medal_bronze_1", "map_magnify", "map_go", "map_edit", "map_delete", "map_add", "map", "male", "magnifier_zoom_in", "magnifier", "magifier_zoom_out", "lorry_link", "lorry_go", "lorry_flatbed", "lorry_error", "lorry_delete", "lorry_add", "lorry", "lock_open", "lock_go", "lock_edit", "lock_delete", "lock_break", "lock_add", "lock", "link_go", "link_error", "link_edit", "link_delete", "link_break", "link_add", "link", "lightning_go", "lightning_delete", "lightning_add", "lightning", "lightbulb_off", "lightbulb_delete", "lightbulb_add", "lightbulb", "layout_sidebar", "layout_link", "layout_header", "layout_error", "layout_edit", "layout_delete", "layout_content", "layout_add", "layout", "layers", "keyboard_magnify", "keyboard_delete", "keyboard_add", "keyboard", "key_go", "key_delete", "key_add", "key", "joystick_error", "joystick_delete", "joystick_add", "joystick", "ipod_sound", "ipod_cast_delete", "ipod_cast_add", "ipod_cast", "ipod", "information", "images", "image_link", "image_edit", "image_delete", "image_add", "image", "html_valid", "html_go", "html_delete", "html_add", "html", "house_link", "house_go", "house", "hourglass_link", "hourglass_go", "hourglass_delete", "hourglass_add", "hourglass", "help", "heart_delete", "heart_add", "heart", "group_link", "group_key", "group_go", "group_gear", "group_error", "group_edit", "group_delete", "group_add", "group", "font_go", "font_delete", "font_add", "font", "folder_wrench", "folder_user", "folder_table", "folder_star", "folder_picture", "folder_palette", "folder_page_white", "folder_page", "folder_magnify", "folder_link", "folder_lightbulb", "folder_key", "folder_image", "folder_heart", "folder_go", "folder_find", "folder_feed", "folder_explore", "folder_error", "folder_edit", "folder_delete", "folder_database", "folder_camera", "folder_bug", "folder_brick", "folder_bell", "folder_add", "folder", "flag_yellow", "flag_red", "flag_purple", "flag_pink", "flag_orange", "flag_green", "flag_blue", "find", "film_save", "film_link", "film_key", "film_go", "film_error", "film_edit", "film_delete", "film_add", "film", "female", "feed_magnify", "feed_link", "feed_key", "feed_go", "feed_error", "feed_edit", "feed_disk", "feed_delete", "feed_add", "feed", "eye", "exclamation", "error_go", "error_delete", "error_add", "error", "emoticon_wink", "emoticon_waii", "emoticon_unhappy", "emoticon_tongue", "emoticon_surprised", "emoticon_smile", "emoticon_happy", "emoticon_grin", "emoticon_evilgrin", "email_open_image", "email_open", "email_link", "email_go", "email_error", "email_edit", "email_delete", "email_attach", "email_add", "email", "dvd_link", "dvd_key", "dvd_go", "dvd_error", "dvd_edit", "dvd_delete", "dvd_add", "dvd", "drive_web", "drive_user", "drive_rename", "drive_network", "drive_magnify", "drive_link", "drive_key", "drive_go", "drive_error", "drive_edit", "drive_disk", "drive_delete", "drive_cd_empty", "drive_cd", "drive_burn", "drive_add", "drive", "drink_empty", "drink", "door_out", "door_open", "door_in", "door", "disk_multiple", "disk", "disconnect", "delete", "date_previous", "date_next", "date_magnify", "date_link", "date_go", "date_error", "date_edit", "date_delete", "date_add", "date", "database_table", "database_save", "database_refresh", "database_link", "database_lightning", "database_key", "database_go", "database_gear", "database_error", "database_edit", "database_delete", "database_connect", "database_add", "database", "cut_red", "cut", "cursor", "cup_link", "cup_key", "cup_go", "cup_error", "cup_edit", "cup_delete", "cup_add", "cup", "css_valid", "css_go", "css_delete", "css_add", "css", "cross", "creditcards", "controller_error", "controller_delete", "controller_add", "controller", "control_stop_blue", "control_stop", "control_start_blue", "control_start", "control_rewind_blue", "control_rewind", "control_repeat_blue", "control_repeat", "control_play_blue", "control_play", "control_pause_blue", "control_pause", "control_fastforward_blue", "control_fastforward", "control_equalizer_blue", "control_equalizer", "control_end_blue", "control_end", "control_eject_blue", "control_eject", "contrast_low", "contrast_increase", "contrast_high", "contrast_decrease", "contrast", "connect", "computer_link", "computer_key", "computer_go", "computer_error", "computer_edit", "computer_delete", "computer_add", "computer", "compress", "comments_delete", "comments_add", "comments", "comment_edit", "comment_delete", "comment_add", "comment", "color_wheel", "color_swatch", "coins_delete", "coins_add", "coins", "cog_go", "cog_error", "cog_edit", "cog_delete", "cog_add", "cog", "clock_stop", "clock_red", "clock_play", "clock_pause", "clock_link", "clock_go", "clock_error", "clock_edit", "clock_delete", "clock_add", "clock", "chart_pie_link", "chart_pie_error", "chart_pie_edit", "chart_pie_delete", "chart_pie_add", "chart_pie", "chart_organisation_delete", "chart_organisation_add", "chart_organisation", "chart_line_link", "chart_line_error", "chart_line_edit", "chart_line_delete", "chart_line_add", "chart_line", "chart_curve_link", "chart_curve_go", "chart_curve_error", "chart_curve_edit", "chart_curve_delete", "chart_curve_add", "chart_curve", "chart_bar_link", "chart_bar_error", "chart_bar_edit", "chart_bar_delete", "chart_bar_add", "chart_bar", "cd_go", "cd_eject", "cd_edit", "cd_delete", "cd_burn", "cd_add", "cd", "cart_remove", "cart_put", "cart_go", "cart_error", "cart_edit", "cart_delete", "cart_add", "cart", "car_delete", "car_add", "car", "cancel", "camera_small", "camera_link", "camera_go", "camera_error", "camera_edit", "camera_delete", "camera_add", "camera", "calendar_view_week", "calendar_view_month", "calendar_view_day", "calendar_link", "calendar_edit", "calendar_delete", "calendar_add", "calendar", "calculator_link", "calculator_error", "calculator_edit", "calculator_delete", "calculator_add", "calculator", "cake", "bullet_yellow", "bullet_wrench", "bullet_white", "bullet_toggle_plus", "bullet_toggle_minus", "bullet_star", "bullet_red", "bullet_purple", "bullet_pink", "bullet_picture", "bullet_orange", "bullet_key", "bullet_green", "bullet_go", "bullet_feed", "bullet_error", "bullet_disk", "bullet_delete", "bullet_blue", "bullet_black", "bullet_arrow_up", "bullet_arrow_top", "bullet_arrow_down", "bullet_arrow_bottom", "bullet_add", "building_link", "building_key", "building_go", "building_error", "building_edit", "building_delete", "building_add", "building", "bug_link", "bug_go", "bug_error", "bug_edit", "bug_delete", "bug_add", "bug", "briefcase", "bricks", "brick_link", "brick_go", "brick_error", "brick_edit", "brick_delete", "brick_add", "brick", "box", "book_previous", "book_open", "book_next", "book_link", "book_key", "book_go", "book_error", "book_edit", "book_delete", "book_addresses", "book_add", "book", "bomb", "bin_empty", "bin_closed", "bin", "bell_link", "bell_go", "bell_error", "bell_delete", "bell_add", "bell", "basket_remove", "basket_put", "basket_go", "basket_error", "basket_edit", "basket_delete", "basket_add", "basket", "award_star_silver_3", "award_star_silver_2", "award_star_silver_1", "award_star_gold_3", "award_star_gold_2", "award_star_gold_1", "award_star_delete", "award_star_bronze_3", "award_star_bronze_2", "award_star_bronze_1", "award_star_add", "attach", "asterisk_yellow", "asterisk_orange", "arrow_up", "arrow_undo", "arrow_turn_right", "arrow_turn_left", "arrow_switch", "arrow_rotate_clockwise", "arrow_rotate_anticlockwise", "arrow_right", "arrow_refresh_small", "arrow_refresh", "arrow_redo", "arrow_out", "arrow_merge", "arrow_left", "arrow_join", "arrow_inout", "arrow_in", "arrow_down", "arrow_divide", "arrow_branch", "application_xp_terminal", "application_xp", "application_view_tile", "application_view_list", "application_view_icons", "application_view_gallery", "application_view_detail", "application_view_columns", "application_tile_vertical", "application_tile_horizontal", "application_split", "application_side_tree", "application_side_list", "application_side_expand", "application_side_contract", "application_side_boxes", "application_put", "application_osx_terminal", "application_osx", "application_link", "application_lightning", "application_key", "application_home", "application_go", "application_get", "application_form_magnify", "application_form_edit", "application_form_delete", "application_form_add", "application_form", "application_error", "application_edit", "application_double", "application_delete", "application_cascade", "application_add", "application", "anchor", "add", "accept"};
        setAttr("imgList", imgList);
    }


}
